using System.Diagnostics;
using TimeToGo.Infrastructure;

namespace TimeToGo.Presentation.ViewModels
{
    internal class OptionsViewModel
    {
        private readonly IView _view;
        public string DateFormat { get; set; }
        public SimpleDelegateCommand<object> OkCommand { get; set; }
        public SimpleDelegateCommand<object> CancelCommand { get; set; }

        public OptionsViewModel(IView view)
        {
            _view = view;
            //DateFormat = ApplicationSettings.DateFormat;
            OkCommand = new SimpleDelegateCommand<object>(Ok);
            CancelCommand = new SimpleDelegateCommand<object>(Cancel);
        }

        private void Ok(object parameter)
        {
            //ApplicationSettings.DateFormat = DateFormat;
            _view.Close();
        }

        private void Cancel(object parameter)
        {
            _view.Close();
        }
    }
}